package com.xydtech.ecard.ftp.enums;

/**
 * @Author: liliya
 * @Description: sys_dict_data  还款方式
 * TODO 存款不填此项
 * 到期还本付息	    1	loan_repayment_mode_type
 * 到期还本定期结息	2	loan_repayment_mode_type
 * 等额本金	        3	loan_repayment_mode_type
 * 等额本息	        4	loan_repayment_mode_type
 * 按还款计划还款	5	loan_repayment_mode_type
 * @Date: Created in 2023/8/15 19:25
 * @Modified:
 */

public enum FtpLoanRepaymentModeTypeEnum {

    LOAN_REPAYMENT_MODE1(1,"到期还本付息"),
    LOAN_REPAYMENT_MODE2(2,"到期还本定期结息"),
    LOAN_REPAYMENT_MODE3(3,"等额本金"),
    LOAN_REPAYMENT_MODE4(4,"等额本息"),
    LOAN_REPAYMENT_MODE5(5,"按还款计划还款");

    private int value;
    private String label;

    FtpLoanRepaymentModeTypeEnum(int value, String label) {
        this.value = value;
        this.label = label;
    }

    public int getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    public static FtpLoanRepaymentModeTypeEnum values(int code){
        for(FtpLoanRepaymentModeTypeEnum enums : FtpLoanRepaymentModeTypeEnum.values()){
            if(enums.getValue() == code){
                return enums;
            }
        }
        return null;
    }

}
